home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / hack / 3_1_3 / sys / winnt / makefile.utl < prev    next >
Encoding:
Makefile  |  1993-04-05  |  7.6 KB  |  290 lines

  1. #       SCCS Id: @(#)Makefile.utl               3.1     93/04/02
  2. #       Copyright (c) NetHack PC Development Team 1993
  3. #
  4. #       NT NetHack 3.1 Utilities Makefile 
  5. #    for MS NMAKE for Windows NT
  6. #  
  7. #    NT Version Tested:  March 1993 SDK pre-release
  8. #
  9. #
  10. #       For questions read the Install.nt file included with
  11. #       the distribution.
  12. #
  13. #    Michael Allison 
  14. #
  15. # ---------------------------------------------------------------------
  16. #  In addition to your C compiler,
  17. #
  18. #  if you want to change   you will need a
  19. #  files with suffix   workalike for
  20. #         .y         yacc
  21. #         .l         lex
  22. #
  23. #  Executables.
  24. #
  25. # All the compiler and linker executables and flags are defined
  26. # by including the following nmake include file.
  27. #
  28. # Do not delete the following include.
  29. #
  30. !include <..\sys\winnt\nhincl.mak>
  31. #
  32. #YACC  = bison -y
  33. YACC   = yacc
  34. LEX   = flex
  35. #LEX   = lex
  36.  
  37. #flex skeleton file (if needed)
  38. FLEXSKEL =
  39. #FLEXSKEL = -S../sys/winnt/flex.ske
  40.  
  41. YTABC  = ytab.c
  42. YTABH  = ytab.h
  43. LEXYYC   = lexyy.c
  44.  
  45. #
  46. #  Flags.
  47. #
  48. # Most flags for Windows NT Console I/O are defined in
  49. # the nmake include file above.
  50. #
  51.  
  52. #
  53. #       Directories
  54. #
  55.  
  56. INCL    = ..\include
  57. DAT     = ..\dat
  58. SRC     = ..\src
  59. DINCL   = ..\include
  60.  
  61. default: all
  62.  
  63.  
  64. #############################################################################
  65. #
  66. # nothing below this line should have to be changed
  67. #
  68. NTSUB = -DWIN32CON
  69. #
  70. #  Utility Objects.
  71. #
  72.  
  73. MAKESRC     = makedefs.c
  74.  
  75. SPLEVSRC    = lev_yacc.c  lev_lex.c   lev_main.c  panic.c
  76.  
  77. DGNCOMPSRC  = dgn_yacc.c  dgn_lex.c   dgn_main.c
  78.  
  79. MAKEOBJS    = makedefs.o  monst.o        objects.o
  80.  
  81. SPLEVOBJS   = lev_yacc.o  lev_$(LEX).o  lev_main.o  alloc.o     \
  82.               monst.o     objects.o     panic.o  \
  83.               drawing.o   decl.o
  84.  
  85. DGNCOMPOBJS = dgn_yacc.o  dgn_$(LEX).o  dgn_main.o  alloc.o      \
  86.               panic.o
  87.  
  88. RECOVOBJS   =  recover.o
  89.  
  90. #
  91. #  Header Objects.
  92. #
  93.  
  94. DGN_FILE_H = $(INCL)\align.h    $(INCL)\dgn_file.h
  95. DUNGEON_H  = $(INCL)\align.h    $(INCL)\dungeon.h
  96. EMIN_H     = $(DUNGEON_H)       $(INCL)\emin.h
  97. EPRI_H     = $(DUNGEON_H)       $(INCL)\align.h     $(INCL)\epri.h
  98. ESHK_H     = $(DUNGEON_H)       $(INCL)\eshk.h
  99. MONDATA_H  = $(INCL)\align.h    $(INCL)\mondata.h
  100. MONST_H    = $(INCL)\align.h    $(INCL)\monst.h
  101. PERMONST_H = $(INCL)\monattk.h  $(INCL)\monflag.h   $(INCL)\align.h   \
  102.              $(INCL)\permonst.h
  103. RM_H       = $(INCL)\align.h    $(INCL)\rm.h
  104. SP_LEV_H   = $(INCL)\align.h    $(INCL)\sp_lev.h
  105. VAULT_H    = $(DUNGEON_H)       $(INCL)\vault.h
  106. YOUPROP_H  = $(PERMONST_H)      $(MONDATA_H)        $(INCL)\prop.h    \
  107.              $(INCL)\pm.h       $(INCL)\youprop.h
  108. YOU_H      = $(MONST_H)         $(YOUPROP_H)        $(INCL)\align.h   \
  109.              $(INCL)\attrib.h   $(INCL)\you.h
  110. DISPLAY_H  = $(MONDATA_H)       $(INCL)\vision.h    $(INCL)\display.h
  111. NTCONF_H   = $(INCL)\micro.h    $(INCL)\system.h    $(INCL)\ntconf.h
  112. CONFIG_H   = $(GLOBAL_H)        $(INCL)\tradstdc.h  $(INCL)\config.h
  113. DECL_H     = $(YOU_H)           $(INCL)\spell.h     $(INCL)\color.h   \
  114.              $(INCL)\obj.h      $(INCL)\onames.h    $(INCL)\pm.h      \
  115.              $(INCL)\decl.h
  116. GLOBAL_H   = $(NTCONF_H)        $(INCL)\coord.h     $(INCL)\global.h
  117. HACK_H     = $(CONFIG_H)        $(DUNGEON_H)        $(DECL_H)         \
  118.              $(DISPLAY_H)       $(INCL)\monsym.h    $(INCL)\mkroom.h  \
  119.              $(INCL)\objclass.h $(INCL)\trap.h      $(INCL)\flag.h    \
  120.              $(RM_H)            $(INCL)\vision.h    $(INCL)\wintype.h \
  121.              $(INCL)\engrave.h  $(INCL)\rect.h      $(INCL)\extern.h \
  122.              $(INCL)\trampoli.h $(INCL)\hack.h
  123.  
  124.  
  125.  
  126. #
  127. #  Make Rules.
  128. #
  129.  
  130. .SUFFIXES:  .exe .o .c .y .l
  131.  
  132. .c.o:
  133.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $*.c
  134.  
  135. #
  136. #  Primary Targets.
  137. #
  138. all:   utility.tag
  139.  
  140. utility.tag: $(INCL)\trap.h    $(INCL)\onames.h        \
  141.              $(INCL)\pm.h      $(SRC)\monstr.c   $(SRC)\vis_tab.c  \
  142.              lev_comp.exe      dgn_comp.exe    recover.exe
  143.     echo utilities made > utility.tag
  144.  
  145. clean:
  146.     if exist *.o del *.o
  147.     if exist *.map del *.map
  148.  
  149. spotless: clean
  150.     if exist utility.tag       del utility.tag
  151.     if exist makedefs.exe      del makedefs.exe
  152.     if exist lev_comp.exe      del lev_comp.exe
  153.     if exist dgn_comp.exe      del dgn_comp.exe
  154.     if exist recover.exe       del recover.exe
  155.     if exist $(INCL)\date.h    del $(INCL)\date.h
  156.     if exist $(INCL)\onames.h  del $(INCL)\onames.h
  157.     if exist $(INCL)\pm.h      del $(INCL)\pm.h
  158.     if exist $(INCL)\vis_tab.h del $(INCL)\vis_tab.h
  159.     if exist $(SRC)\monstr.c   del $(SRC)\monstr.c
  160.     if exist $(SRC)\vis_tab.c  del $(SRC)\vis_tab.c
  161.  
  162. #
  163. #  Secondary Targets.
  164. #
  165.  
  166. $(INCL)\onames.h: makedefs.exe
  167.     .\makedefs -o
  168.  
  169. $(INCL)\pm.h: makedefs.exe
  170.     .\makedefs -p
  171.  
  172. $(SRC)\monstr.c: makedefs.exe
  173.     .\makedefs -m
  174.  
  175. $(SRC)\vis_tab.h: makedefs.exe
  176.     .\makedefs -z
  177.  
  178. $(SRC)\vis_tab.c: makedefs.exe
  179.     .\makedefs -z
  180.  
  181. #
  182. #  Makedefs Stuff
  183. #
  184.  
  185. makedefs.exe:  $(MAKEOBJS)
  186.     $(link) $(linkdebug) $(conflags) -out:$*.exe $(MAKEOBJS) $(conlibs)
  187.  
  188. makedefs.o:  $(CONFIG_H)        $(PERMONST_H)      $(INCL)\objclass.h \
  189.              $(INCL)\monsym.h   $(INCL)\qtext.h
  190.  
  191. #
  192. #  Level Compiler Dependencies
  193. #
  194.  
  195. lev_comp.exe:  $(SPLEVOBJS)
  196.     @echo $(SPLEVOBJS) > $*.res
  197.     $(link) $(linkdebug) $(conflags) -out:$*.exe @$*.res $(conlibs)
  198.  
  199. lev_yacc.o:  $(HACK_H)   $(SP_LEV_H)    lev_yacc.c
  200.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $*.c
  201.  
  202. lev_$(LEX).o:  $(HACK_H)   $(SP_LEV_H)    $(INCL)\lev_comp.h \
  203.                lev_lex.c
  204.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o \
  205.                lev_lex.c
  206.  
  207. lev_main.o:  $(HACK_H)
  208.  
  209. $(INCL)\lev_comp.h: lev_yacc.c
  210.  
  211. lev_yacc.c:  lev_comp.y
  212.     $(YACC) -d lev_comp.y
  213.     copy $(YTABC) lev_yacc.c
  214.     copy $(YTABH) $(DINCL)\lev_comp.h
  215.     del $(YTABC)
  216.     del $(YTABH)
  217.  
  218.  
  219. lev_lex.c:  lev_comp.l
  220.     $(LEX) $(FLEXSKEL) lev_comp.l
  221.     copy $(LEXYYC) lev_lex.c
  222.     del $(LEXYYC)
  223.  
  224.  
  225. #
  226. #  Dungeon Dependencies
  227. #
  228.  
  229. dgn_comp.exe:  $(DGNCOMPOBJS)
  230.     @echo $(DGNCOMPOBJS) > $*.res
  231.     $(link) $(linkdebug) $(conflags) -out:$*.exe @$*.res $(conlibs)
  232.  
  233. dgn_yacc.o:  $(HACK_H)   $(DGN_FILE_H)  dgn_yacc.c
  234.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $*.c
  235.  
  236. dgn_$(LEX).o:  $(HACK_H)   $(DGN_FILE_H)  $(INCL)\dgn_comp.h \
  237.                dgn_lex.c
  238.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o \
  239.            dgn_lex.c
  240.  
  241. dgn_main.o:  $(HACK_H)
  242.  
  243. $(INCL)\dgn_comp.h:  dgn_yacc.c
  244.  
  245. dgn_yacc.c: dgn_comp.y
  246.     $(YACC) -d dgn_comp.y
  247.     copy $(YTABC) dgn_yacc.c
  248.     copy $(YTABH) $(DINCL)\dgn_comp.h
  249.     del $(YTABC)
  250.     del $(YTABH)
  251.  
  252. dgn_lex.c:  dgn_comp.l
  253.     $(LEX) $(FLEXSKEL)  dgn_comp.l
  254.     copy $(LEXYYC) dgn_lex.c
  255.     del $(LEXYYC)
  256.  
  257. #
  258. #  Recover Utility
  259. #
  260.  
  261. recover.exe:   $(RECOVOBJS)
  262.     $(link) $(linkdebug) $(conflags) -out:$*.exe $(RECOVOBJS) $(conlibs)
  263.  
  264. recover.o:   $(CONFIG_H) recover.c
  265.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $*.c
  266.  
  267. #
  268. #  Other Dependencies.
  269. #
  270.  
  271. alloc.o: $(CONFIG_H)     $(SRC)\alloc.c
  272.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(SRC)\$*.c
  273.  
  274. drawing.o: $(CONFIG_H) $(SRC)\drawing.c
  275.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(SRC)\$*.c
  276.  
  277. decl.o: $(CONFIG_H) $(SRC)\decl.c
  278.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(SRC)\$*.c
  279.  
  280. monst.o: $(CONFIG_H)         $(PERMONST_H)      $(ESHK_H)          \
  281.          $(EPRI_H)           $(VAULT_H)         $(INCL)\monsym.h   \
  282.          $(INCL)\color.h     $(SRC)\monst.c
  283.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(SRC)\$*.c
  284.  
  285. objects.o: $(CONFIG_H)        $(INCL)\obj.h      $(INCL)\objclass.h \
  286.            $(INCL)\prop.h     $(INCL)\color.h    $(SRC)\objects.c
  287.     $(cc) $(cflags) $(NTSUB) -I$(INCL)  $(cvars) $(cdebug) -Fo$*.o $(SRC)\$*.c
  288.  
  289. panic.o:   $(CONFIG_H)
  290.